/**
 * There are code generation
 */
package com.neusoft.lohas.modules.ivm.entity.workflow;


import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.neusoft.lohas.common.persistence.IdEntity;
import com.neusoft.lohas.modules.ivm.entity.merchant.DeliveryIndent;

/**
 * 流程详情Entity
 * @author Jackie.Liu
 * @version 2014-12-21
 */
@Entity
@Table(name = "ivm_workflow_detail")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class WorkFlowDetail extends IdEntity<WorkFlowDetail> {

	private static final long serialVersionUID = 1L;
	private WorkFlow workFlow;	 //流程
	private String flowNode;	 //流程节点
	private DeliveryIndent deliveryIndent;	  //送货员订单
	
	public WorkFlowDetail() {
		super();
	}

	public WorkFlowDetail(String id){
		this();
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "flow_id")
	@NotFound(action = NotFoundAction.IGNORE)
	@JsonIgnore
	public WorkFlow getWorkFlow() {
		return workFlow;
	}

	public void setWorkFlow(WorkFlow workFlow) {
		this.workFlow = workFlow;
	}

	public String getFlowNode() {
		return flowNode;
	}

	public void setFlowNode(String flowNode) {
		this.flowNode = flowNode;
	}

	@ManyToOne
	@JoinColumn(name="delivery_id")
	@NotFound(action = NotFoundAction.IGNORE)
	public DeliveryIndent getDeliveryIndent() {
		return deliveryIndent;
	}

	public void setDeliveryIndent(DeliveryIndent deliveryIndent) {
		this.deliveryIndent = deliveryIndent;
	}
}


